<template>
  <div>
    <div>
      <el-form
        ref="dataForm"
        :model="sysAccount"
        label-width="200px"
        size="small"
        style="padding-right: 40px"
      >
        <el-form-item label="账户ID" prop="id">
          <el-input v-model="sysAccount.id" :readonly="true" />
        </el-form-item>
        <el-form-item label="交易密码" prop="tradepassword">
          <el-input v-model="sysAccount.tradepassword" :readonly="true" />
        </el-form-item>
        <el-form-item label="可用金额" prop="usableamount">
          <el-input v-model="sysAccount.usableamount" :readonly="true" />
        </el-form-item>
        <el-form-item label="冻结金额" prop="freezedamount">
          <el-input v-model="sysAccount.freezedamount" :readonly="true" />
        </el-form-item>
        <el-form-item label="借款限额金额" prop="borrowlimitamount">
          <el-input v-model="sysAccount.borrowlimitamount" :readonly="true" />
        </el-form-item>
        <el-form-item label="版本号" prop="version">
          <el-input v-model="sysAccount.version" :readonly="true" />
        </el-form-item>
        <el-form-item label="未收利息" prop="unreceiveinterest">
          <el-input v-model="sysAccount.unreceiveinterest" :readonly="true" />
        </el-form-item>
        <el-form-item label="未收本金" prop="unreceiveprincipal">
          <el-input v-model="sysAccount.unreceiveprincipal" :readonly="true" />
        </el-form-item>
        <el-form-item label="未还金额" prop="unreturnamount">
          <el-input v-model="sysAccount.unreturnamount" :readonly="true" />
        </el-form-item>
        <el-form-item label="剩余借款额度" prop="remainborrowlimit">
          <el-input v-model="sysAccount.remainborrowlimit" :readonly="true" />
        </el-form-item>
      </el-form>
    </div>
  </div>
</template>

<script>
import api from "@/api/account/account.js"
export default {
  data() {
    return {
      sysAccount: {},
      
    };
  },
  created() {
    console.log("获取id参数" + this.$route.query.id); // 获取id参数
    console.log("获取realname参数" + this.$route.query.realname); // 获取realname参数
    this.fetchData();
  },
  methods:{
    fetchData() {
      api.getAccountByIdName(this.$route.query.id,this.$route.query.realname).then((response)=>{
        console.log(response.data);
        console.log(response.data);
        this.sysAccount = response.data
      })
     }
  }
};
</script>

<style scoped>
.account-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background-color: #f5f5f5;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.el-form-item {
  margin-bottom: 20px;
}

.el-form-item label {
  width: 120px;
  font-weight: bold;
}

.el-input {
  width: 300px;
}
</style>
